package jhunter.dao.type;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;

/**
 * StatementCreatorUtils
 * 
 * @author jkyang
 * 
 */
public class StringTypeHandler extends BaseTypeHandler {

	@Override
	public String getTypeName() {
		return "string";
	}

	@Override
	public int getSqlType() {
		return Types.VARCHAR;
	}

	@Override
	public Class<?> getJavaType() {
		return String.class;
	}

	@Override
	protected String getNotNullJavaObject(ResultSet rs, String columnName) throws SQLException {
		return rs.getString(columnName);
	}

	@Override
	public String getHibernateTypeName() {
		return "string";
	}

}
